package com.java.demo.model;

import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * @Author: wenjingyuan
 * @Date: 2023/07/20/20:17
 * @Description:
 */
@Component
public class Users {
    @Bean("user1")
    public User user1(){
        User user=new User();
        user.setId(1);
        user.setName("张三");
        return  user;
    }

    @Bean("user2")
    public User user2(){
        User user=new User();
        user.setId(2);
        user.setName("李四");
        return  user;
    }
}
